package com.yuan.controller;

import com.yuan.service.ProviderFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerController {
    @Autowired
    private ProviderFeign providerFeign;

    @GetMapping("/openfeign/hi")
    public String sayHello(@RequestParam(name = "name") String name) {
        return providerFeign.sayHello(name);
    }

    @GetMapping("/openfeign/appName")
    public String getAppName() {
        return providerFeign.getAppName();
    }

}
